package com.songcha.module_mine.ui.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import com.songcha.module_mine.ui.fragment.message.message_notify.MessageNotifyFragment
import com.songcha.module_mine.ui.fragment.message.my_comment.MessageMyCommentFragment

class MessageAdapter(fm:FragmentManager,val mList:MutableList<String>):FragmentStatePagerAdapter(fm) {
    override fun getCount(): Int {
        return mList.size
    }

    override fun getItem(position: Int): Fragment {
        if(position==0){
            return MessageNotifyFragment()
        }else{
            return MessageMyCommentFragment()
        }
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return mList[position]
    }

}